package com.tz.ebusiness.service.impl;

import com.tz.ebusiness.entity.User;
import com.tz.ebusiness.mapper.UserMapper;
import com.tz.ebusiness.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService{

    @Autowired
    UserMapper userMapper;

    @Override
    public void registerUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public User loign(String username, String password) {
        return userMapper.selectUser(username,password);
    }

    @Override
    public User findUser(String username) {
        return userMapper.findUser(username);
    }

    @Override
    public void logout() {

    }
}
